package org.jetlinks.community.mstn.logging;

import java.util.Map;

public class MstnAssetsRequestInfo {
    private String requestId;
    private String ipAddr;
    private String path;
    private String requestMethod;
    private String userId;
    private String tenantId;


    private String username;
    private Map<String, String> headers;
    private Map<String, String> context;

    public static RequestInfoBuilder builder() {
        return new RequestInfoBuilder();
    }

    public String getRequestId() {
        return this.requestId;
    }

    public String getIpAddr() {
        return this.ipAddr;
    }

    public String getPath() {
        return this.path;
    }

    public String getRequestMethod() {
        return this.requestMethod;
    }

    public String getUserId() {
        return this.userId;
    }

    public String getUsername() {
        return this.username;
    }

    public Map<String, String> getHeaders() {
        return this.headers;
    }

    public Map<String, String> getContext() {
        return this.context;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public void setIpAddr(String ipAddr) {
        this.ipAddr = ipAddr;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public void setRequestMethod(String requestMethod) {
        this.requestMethod = requestMethod;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setHeaders(Map<String, String> headers) {
        this.headers = headers;
    }

    public void setContext(Map<String, String> context) {
        this.context = context;
    }



    public MstnAssetsRequestInfo() {
    }

    public MstnAssetsRequestInfo(String requestId, String ipAddr, String path, String requestMethod, String userId, String username, Map<String, String> headers, Map<String, String> context) {
        this.requestId = requestId;
        this.ipAddr = ipAddr;
        this.path = path;
        this.requestMethod = requestMethod;
        this.userId = userId;
        this.username = username;
        this.headers = headers;
        this.context = context;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public static class RequestInfoBuilder {
        private String requestId;
        private String ipAddr;
        private String path;
        private String requestMethod;
        private String userId;
        private String username;
        private Map<String, String> headers;
        private Map<String, String> context;

        RequestInfoBuilder() {
        }

        public RequestInfoBuilder requestId(String requestId) {
            this.requestId = requestId;
            return this;
        }

        public RequestInfoBuilder ipAddr(String ipAddr) {
            this.ipAddr = ipAddr;
            return this;
        }

        public RequestInfoBuilder path(String path) {
            this.path = path;
            return this;
        }

        public RequestInfoBuilder requestMethod(String requestMethod) {
            this.requestMethod = requestMethod;
            return this;
        }

        public RequestInfoBuilder userId(String userId) {
            this.userId = userId;
            return this;
        }

        public RequestInfoBuilder username(String username) {
            this.username = username;
            return this;
        }

        public RequestInfoBuilder headers(Map<String, String> headers) {
            this.headers = headers;
            return this;
        }

        public RequestInfoBuilder context(Map<String, String> context) {
            this.context = context;
            return this;
        }

        public MstnAssetsRequestInfo build() {
            return new MstnAssetsRequestInfo(this.requestId, this.ipAddr, this.path, this.requestMethod, this.userId, this.username, this.headers, this.context);
        }

        public String toString() {
            return "RequestInfoBuilder(requestId=" + this.requestId + ", ipAddr=" + this.ipAddr + ", path=" + this.path + ", requestMethod=" + this.requestMethod + ", userId=" + this.userId + ", username=" + this.username + ", headers=" + this.headers + ", context=" + this.context + ")";
        }
    }
}
